package cn.ds.fly.modules.sys.entity;

import cn.ds.fly.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by lds on 2017/12/14.
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "fly_user")
public class FlyUser extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 7878372721524316281L;
    /**
     * 用户名
     */
    @Column
    private String username;
    /**
     * 密码
     */
    @Column
    private String password;
    /**
     * 盐
	 */
    @Column
    private String salt;
    /**
     * 邮箱
     */
    @Column
    private String email;
    /**
     * 手机号
     */
    @Column
    private String mobile;
    /**
     * 状态  0：禁用   1：正常
     */
    @Column
    private Integer status;

    /**
     * 角色ID列表
     */
    @Transient
    private List<String> roleIdList = new ArrayList<>();

    /**
     * 部门ID
     */
    @Column(name = "dept_id")
    private String deptId;

    /**
     * 部门名称
     */
    @Transient
    private String deptName;

}
